package swingxrcp.framework.server.spring;

import org.springframework.context.ApplicationContext;

import swingxrcp.framework.model.Action;
import swingxrcp.framework.server.action.ActionFactory;

/**
 * Action工厂 Spring适配实现
 *
 * @author liangfei
 * @since 2008-10-26
 */
public class SpringActionFactory implements ActionFactory {

	private final ApplicationContext applicationContext;

	public SpringActionFactory(ApplicationContext applicationContext) {
		this.applicationContext = applicationContext;
	}

	public Action getAction(String actionName) {
		return (Action)applicationContext.getBean(actionName);
	}

}
